package cn.polymhomework03;


/**
 * 除
 * @author
 *
 */
public class Div extends Calculator {
    @Override
    public double getResult() {
        if (getY()==0) {
            System.out.println("除数不能为0");
            return 0;
        }else{
            return getX()/getY();
        }
    }
}

